home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17300 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.2 KB

  1. Path: news.magmacom.com!Jan
  2. From: Jan@Bytesmiths.com (Jan Steinman)
  3. Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk
  4. Subject: Re: Advice to Java proponents (was Re: Will Java kill C++?)
  5. Date: 13 Apr 1996 00:45:18 GMT
  6. Organization: Bytesmiths, the Smalltalk start-up specialists
  7. Message-ID: <Jan-1204961943190001@news.magmacom.com>
  8. References: <315BFB16.B74@isg.de> <4jgv6t$hon@kadath.zeitgeist.net> <4k3cdo$np5@taurus.adnc.com> <DpG1s1.GC9@research.att.com> <4k71f5$ot5@news2.ios.com> <31684F33.2528@ibm.net> <denatale-0804960926250001@grail1213.nando.net> <316DA213.767B@vdc.smos.com> <316E2AD0.17C3@concentric.net>
  9. Reply-To: Jan@Bytesmiths.com
  10. NNTP-Posting-Host: 206.116.214.1
  11. X-Newsreader: Yet Another NewsWatcher 2.2.0b6
  12.  
  13. In article <316E2AD0.17C3@concentric.net>, alovejoy@concentric.net wrote:
  14.  
  15. > Gord Wait wrote:
  16. > > 
  17. > > Rick DeNatale wrote:
  18. > > >
  19. > > > It doesn't bode well for the ultimate fate of a language when important
  20. > > > things that people want to do with the language aren't provided in
  21. > > > standard ways in the language...
  22. ...
  23. > > One thing nice in the language is the easy TCP/IP hooks already there!
  24. > > Since the base library set already includes "easy" TCP/IP support, java
  25. > > just might live up to the title of king of the "networking" languages..
  26. ...
  27. > Proud of the networking functions in the Java library, are we?
  28. > VisualWorks Smalltalk has had such for quite a while now.  Consider
  29. > one of the example class methods of the class SocketAccessor...
  30.  
  31. [code deleted...]
  32.  
  33. Consider also that the code Alan posted (not blaming you, Alan -- I know
  34. it wasn't yours) is extremely special-purpose, because the SocketAccessor
  35. class tries to look as much like the C interface as possible. With a
  36. little bit of effort, one can implement a nice abstract TCP framework in a
  37. few days or so. My time server looks more like this:
  38.  
  39. ByTcpServer
  40.    defaultService: [:request |
  41.       request stream nextLongPut: TimeStamp now seconds]
  42.    forPort: 37.
  43. (ByTcpServer forPort: 37) resume.
  44.  
  45. How about telnet?
  46.  
  47. ByTcpServer
  48.    defaultService: [:request | | stream |
  49.         (stream := request stream)
  50.             next: 6; "Discard garbage characters. They must be part of the
  51. telnet protocol, but I'll ignore them for now."
  52.             nextPutAll: 'Smalltalk evaluation service -- '; nextPutAll:
  53. request version; cr;
  54.             nextPutAll: 'WARNING: backspace is not handled!!'; cr;
  55.             nextPutAll: 'Type "self close" to end session'; cr;
  56.             nextPutAll: 'Smalltalk> '.
  57.         [stream
  58.             print: (Compiler silentEvaluate: stream nextLine for: stream); cr;
  59.             nextPutAll: 'Smalltalk> '] repeat]
  60.    forPort: 23.
  61. (ByTcpServer forPort: 23) resume.
  62.  
  63. We also have an object service that we use for blasting ComposedTextViews
  64. between images (among other thing) -- better than email!
  65.  
  66. We also have an ftpd that files out code on the fly, and an httpd that
  67. allows browsing Smalltalk over the web. All of these servers run at the
  68. same time in a single image.
  69.  
  70. Much of the code for this general-purpose server will be in the July issue
  71. of The Smalltalk Report, and we hope to have it live on the web for people
  72. to play with.
  73.  
  74.  : Jan Steinman <mailto:Jan@Bytesmiths.com>
  75.  : Bytesmiths, the Smalltalk specialists <http://www.bytesmiths.com>
  76.  : "This is witty signature 1 of 47,288."
  77.